<template>
    <div class="DiagnoseRecord">
        <div class="visitTop">
            <div class="h6"><b>当前患者</b></div>
            <div class="topGray">
                <div class="oneBtn" v-if="false">
                    <button class="btn btn-default">切换病人</button>
                </div>
                <div class="zyNum" v-if="false">
                    <p>
                        <label>住院次数：</label>
                        <select class="form-control">
                            <option>第一次</option>
                        </select>
                    </p>
                </div>
                <div class="basic clearfix">
                    <p><label>姓名：</label><span>{{selectPatientObj.Name}}</span></p>
                    <p><label>性别：</label><span>{{selectPatientObj.SexName}}</span></p>
                    <p><label>出生日期：</label><span>{{selectPatientObj.Born}}</span></p>
                    <p><label>患者类型：</label><span>{{selectPatientObj.PatientTypeName}}</span></p>
                    <p><label>主索引号：</label><span>{{selectPatientObj.Empi}}</span></p>

                </div>
                <div class="basic basic2 clearfix" v-if="false">
                    <p><label>床号：</label><span>2</span></p>
                    <p><label>类型：</label><span>普通病人</span></p>
                    <p><label>入院：</label><span>2019-08-01 09:35</span></p>

                    <p><label>病况：</label><span>一般</span></p>
                    <p><label>诊断信息：</label><span>眼底出血</span></p>
                </div>
            </div>

        </div>
        <div class="Diagnose nBox" v-if="isShow=='JZJL'">
            <div class="h0">
                <p class="lt">就诊记录</p>
            </div>
            <el-row class="selectTime" style="padding: 6px">
                <el-col :span="4">
                    <span>时间：</span>
                    <el-date-picker type="date" placeholder="Select date" @change="getDataList()" style="width: 200px"
                                    v-model="queryDataObj.BeginDate"
                                    value-format="yyyy-MM-dd"
                    ></el-date-picker>
                </el-col>
                <el-col :span="1" style="color: #348EED;font-size: 16px;text-align:center;padding: 6px">至</el-col>
                <el-col :span="4">
                    <el-date-picker type="date" placeholder="Select date" @change="getDataList()" style="width: 200px"
                                    v-model="queryDataObj.EndDate"
                                    value-format="yyyy-MM-dd"
                    ></el-date-picker>
                </el-col>
                <el-col :span="2">
                    <Button type="primary" @click="getDataList()" icon="ios-search">搜索</Button>
                </el-col>
            </el-row>
            <!--右侧-->
            <div class="czq panel-default">
                <div class="Tb">
                    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
                        <el-tab-pane label="门诊" name="first">
                            <el-table
                                    ref="multipleTable"
                                    :data="MZLJList"
                                    height="436"
                                    tooltip-effect="dark"
                                    style="width: 100%"
                            >
                                <el-table-column
                                        prop="PatientId"
                                        label="患者ID"
                                        width="120">
                                </el-table-column>
                                <el-table-column
                                        prop="VisitTime"
                                        label="就诊时间"
                                        width="120">
                                </el-table-column>
                                <el-table-column
                                        label="就诊序号"
                                        width="120">
                                    <template slot-scope="scope">{{ scope.row.VisitId }}</template>
                                </el-table-column>
                                <el-table-column
                                        prop="RegisterName"
                                        label="号种"
                                        show-overflow-tooltip>
                                </el-table-column>


                                <el-table-column
                                        prop="DoctorName"
                                        label="医生姓名"
                                        show-overflow-tooltip>
                                </el-table-column>
                                <el-table-column
                                        prop="SectionName"
                                        label="科室名称"
                                        show-overflow-tooltip>
                                </el-table-column>

                                <el-table-column
                                        prop="HospitalName"
                                        label="医疗机构"
                                        show-overflow-tooltip>
                                </el-table-column>

                                <el-table-column
                                        fixed="right"
                                        label="操作"
                                        width="100">
                                    <template slot-scope="scope">
                                        <el-button @click="handleClickInforMZ(scope.row)" type="text" size="small">详细信息
                                        </el-button>

                                    </template>
                                </el-table-column>
                            </el-table>
                        </el-tab-pane>
                        <el-tab-pane label="住院" name="second">
                            <el-table
                                    ref="multipleTable"
                                    :data="ZYJLList"
                                    height="436"
                                    tooltip-effect="dark"
                                    style="width: 100%; "
                            >
                                <el-table-column
                                        label="住院号"
                                        width="120">
                                    <template slot-scope="scope">{{ scope.row.PatientId }}</template>
                                </el-table-column>
                                <el-table-column
                                        prop="VisitNo"
                                        label="住院次数"
                                        show-overflow-tooltip>
                                </el-table-column>
                                <el-table-column
                                        prop="InTime"
                                        label="入院时间"
                                        width="120">
                                </el-table-column>
                                <el-table-column
                                        prop="OutTime"
                                        label="出院时间"
                                        width="120"
                                        show-overflow-tooltip>
                                </el-table-column>
                                <el-table-column
                                        prop="InDiageName"
                                        label="诊断信息"
                                        show-overflow-tooltip>
                                </el-table-column>
                                <el-table-column
                                        prop="OutDiageName"
                                        label="出院诊断"
                                        show-overflow-tooltip>
                                </el-table-column>
                                <el-table-column
                                        prop="DoctorName"
                                        label="医生姓名"
                                        show-overflow-tooltip>
                                </el-table-column>
                                <el-table-column
                                        prop="InSectionName"
                                        label="入院科室名称"
                                        show-overflow-tooltip>
                                </el-table-column>
                                <el-table-column
                                        prop="OutSectionName"
                                        label="出院科室名称"
                                        show-overflow-tooltip>
                                </el-table-column>
                                <el-table-column
                                        prop="HospitalName"
                                        label="医疗机构"
                                        show-overflow-tooltip>
                                </el-table-column>

                                <el-table-column
                                        fixed="right"
                                        label="操作"
                                        width="100">
                                    <template slot-scope="scope">
                                        <el-button @click="handleClickInforZY(scope.row)" type="text" size="small">详细信息
                                        </el-button>

                                    </template>
                                </el-table-column>
                            </el-table>
                        </el-tab-pane>
                    </el-tabs>
                </div>
            </div>
        </div>
        <div class="DiagnoseDet nBox" v-if="isShow=='ZYXQ'">
            <div class="h0">
                <p class="lt">住院 详细记录</p>
                <button class="btn btn-default" style="float: right;margin-right: 6px" @click="show('JZJL')">返回就诊记录
                </button>
            </div>
            <!--右侧-->
            <div class="czq panel-default">
                <div v-if="false" class="pucType2 clearfix">

                    <p>就诊类别：<b>住院</b></p>
                    <p>诊断信息：<b style="color:red">肺部感染</b></p>
                    <p>医生姓名：<b>测试</b></p>
                    <p>科室名称：<b>测试</b></p>
                    <p>病区名称：<b>测试</b></p>
                    <p>医疗机构：<b>测试</b></p>
                </div>
                <div class="InforTable">
                    <el-tabs :tab-position="tabPosition" v-model="activeNameInforZY" style="height: 100%;"
                             @tab-click="handleClickZY">
                        <el-tab-pane name="zyyz">
                            <span slot="label"><i class="el-icon-s-order"></i> 医嘱</span>
                            <div class="InforTableYZ">
                                <el-tabs v-model="activeNameYZType" type="card" @tab-click="handleClickYZ">
                                    <el-tab-pane label="临嘱" name="1">
                                        <el-table
                                                :data="ZYYZList"
                                                height="460"
                                                style="width: 100%">
                                            <el-table-column label="开始">

                                                <el-table-column
                                                        prop="BeginTime"
                                                        label="时间"
                                                        width="120">
                                                </el-table-column>
                                                <el-table-column
                                                        prop="ItemName"
                                                        label="医嘱名称"
                                                        show-overflow-tooltip>
                                                </el-table-column>
                                                <el-table-column
                                                        prop="ItemSpec"
                                                        label="规格"
                                                        show-overflow-tooltip>
                                                </el-table-column>
                                                <el-table-column
                                                        prop="Frequency"
                                                        label="频率"
                                                        show-overflow-tooltip>
                                                </el-table-column>
                                                <el-table-column
                                                        prop="Usage"
                                                        label="用法"
                                                        show-overflow-tooltip>
                                                </el-table-column>
                                                <el-table-column
                                                        prop="Doctor"
                                                        label="医师"
                                                        width="120"
                                                        show-overflow-tooltip>
                                                </el-table-column>
                                                <el-table-column
                                                        prop="Nures"
                                                        label="核对护士"
                                                        width="120"
                                                        show-overflow-tooltip>
                                                </el-table-column>
                                            </el-table-column>
                                            <el-table-column label="停止">
                                                <el-table-column
                                                        prop="EndTime"
                                                        label="时间"
                                                        width="120">
                                                </el-table-column>

                                                <el-table-column
                                                        prop="EndDoctor"
                                                        label="医师"
                                                        width="120">
                                                </el-table-column>
                                                <el-table-column
                                                        prop="EndNurse"
                                                        label="核对护士"
                                                        width="120">
                                                </el-table-column>
                                            </el-table-column>
                                        </el-table>
                                    </el-tab-pane>
                                    <el-tab-pane label="长嘱" name="2">
                                        <el-table
                                                height="460"
                                                :data="ZYYZList"
                                                style="width: 100%">
                                            <el-table-column label="开始">

                                                <el-table-column
                                                        prop="BeginTime"
                                                        label="时间"
                                                        width="120">
                                                </el-table-column>
                                                <el-table-column
                                                        prop="ItemName"
                                                        label="医嘱名称"
                                                        show-overflow-tooltip>
                                                </el-table-column>
                                                <el-table-column
                                                        prop="ItemSpec"
                                                        label="规格"
                                                        show-overflow-tooltip>
                                                </el-table-column>
                                                <el-table-column
                                                        prop="Frequency"
                                                        label="频率"
                                                        show-overflow-tooltip>
                                                </el-table-column>
                                                <el-table-column
                                                        prop="Usage"
                                                        label="用法"
                                                        show-overflow-tooltip>
                                                </el-table-column>
                                                <el-table-column
                                                        prop="Doctor"
                                                        label="医师"
                                                        width="120"
                                                        show-overflow-tooltip>
                                                </el-table-column>
                                                <el-table-column
                                                        prop="Nures"
                                                        label="核对护士"
                                                        width="120"
                                                        show-overflow-tooltip>
                                                </el-table-column>
                                            </el-table-column>
                                            <el-table-column label="停止">
                                                <el-table-column
                                                        prop="EndTime"
                                                        label="时间"
                                                        width="120">
                                                </el-table-column>

                                                <el-table-column
                                                        prop="EndDoctor"
                                                        label="医师"
                                                        width="120">
                                                </el-table-column>
                                                <el-table-column
                                                        prop="EndNurse"
                                                        label="核对护士"
                                                        width="120">
                                                </el-table-column>
                                            </el-table-column>
                                        </el-table>
                                    </el-tab-pane>
                                </el-tabs>
                            </div>
                        </el-tab-pane>
                        <el-tab-pane name="zyzl" v-if="false">
                            <span slot="label"><i class="el-icon-s-order"></i> 治疗信息</span>
                            <div class="InforTableYZ">
                                <el-tabs v-model="activeNameYZType" type="card">
                                    <el-table
                                            :data="ZYZLList"
                                            height="456"
                                            style="width: 100%">
                                        <el-table-column
                                                prop="PresNo"
                                                label="序号">
                                        </el-table-column>

                                        <el-table-column
                                                prop="ItemName"
                                                label="名称"
                                        >
                                        </el-table-column>
                                        <el-table-column
                                                prop="ItemSpec"
                                                label="规格"
                                        >
                                        </el-table-column>

                                        <el-table-column
                                                prop="Quantity"
                                                label="数量"
                                                width="120"
                                                show-overflow-tooltip>
                                        </el-table-column>
                                        <el-table-column
                                                prop="UnitName"
                                                label="单位"
                                                width="120"
                                                show-overflow-tooltip>
                                        </el-table-column>
                                    </el-table>
                                </el-tabs>
                            </div>
                        </el-tab-pane>
                        <el-tab-pane name="zyjy">
                            <span slot="label"><i class="el-icon-magic-stick"></i> 检验</span>
                            <el-row>
                                <el-col :span="6" class="bltree">
                                    <el-card class="box-card,JYclass">
                                        <div slot="header" class="clearfix">
                                            <span>检验报告单</span>
                                            <el-button style="float: right; padding: 3px 0" v-if="false" type="text">
                                                操作按钮
                                            </el-button>
                                        </div>
                                        <el-table
                                                ref="multipleTable"
                                                :data="MZJYList"
                                                @current-change="handleCurrentChangeZYJY"
                                                tooltip-effect="dark"
                                                height="456"
                                                highlight-current-row
                                                style="width: 100%"
                                        >
                                            <el-table-column
                                                    label="时间"
                                                    width="120">
                                                <template slot-scope="scope">{{ scope.row.CreateDate }}</template>
                                            </el-table-column>

                                            <el-table-column
                                                    prop="ReportTitle"
                                                    label="报告单名称"
                                                    show-overflow-tooltip>
                                            </el-table-column>

                                        </el-table>
                                    </el-card>

                                </el-col>
                                <el-col :span="18">
                                    <el-card class="box-card">
                                        <div slot="header" class="clearfix">
                                            <span>检验报告</span>
                                            <el-button style="float: right; padding: 3px 0" v-if="false" type="text">
                                                操作按钮
                                            </el-button>
                                        </div>
                                        <el-table
                                                ref="multipleTable"
                                                :data="MZJYBGInforList"
                                                tooltip-effect="dark"
                                                height="456"
                                                style="width: 100%"
                                        >
                                            <el-table-column
                                                    prop="ItemName"
                                                    label="检验项目"
                                                    show-overflow-tooltip>
                                            </el-table-column>
                                            <el-table-column
                                                    label="项目结果"
                                                    width="150">
                                                <template slot-scope="scope">{{ scope.row.Result }}</template>
                                            </el-table-column>
                                            <el-table-column
                                                    prop="ItemUnit"
                                                    label="单位"
                                                    width="100"
                                                    show-overflow-tooltip>
                                            </el-table-column>
                                            <el-table-column
                                                    prop="Arrow"
                                                    label="标记"
                                                    width="100"
                                                    show-overflow-tooltip>
                                            </el-table-column>
                                            <el-table-column
                                                    prop="RefRange"
                                                    label="参考范围"
                                                    width="180"
                                                    show-overflow-tooltip>
                                            </el-table-column>

                                        </el-table>
                                    </el-card>

                                </el-col>
                            </el-row>
                        </el-tab-pane>
                        <el-tab-pane name="zyjc">
                            <span slot="label"><i class="el-icon-view"></i> 检查</span>
                            <el-row>
                                <el-col :span="8" class="bltree">
                                    <el-card class="box-card,JYclass">
                                        <div slot="header" class="clearfix">
                                            <span>检查报告单</span>
                                            <el-button style="float: right; padding: 3px 0" v-if="false" type="text">
                                                操作按钮
                                            </el-button>
                                        </div>
                                        <el-table
                                                ref="multipleTable"
                                                :data="MZJCList"
                                                tooltip-effect="dark"
                                                height="456"
                                                highlight-current-row
                                                @current-change="handleCurrentChangeZYJC"
                                                style="width: 100%"
                                        >
                                            <el-table-column
                                                    label="时间"
                                                    width="120">
                                                <template slot-scope="scope">{{ scope.row.CreateDate }}</template>
                                            </el-table-column>

                                            <el-table-column
                                                    prop="ReportTitle"
                                                    label="报告名称"
                                                    show-overflow-tooltip>
                                            </el-table-column>
                                            <el-table-column
                                                    prop="CheckBody"
                                                    label="检查部位"
                                                    show-overflow-tooltip>
                                            </el-table-column>
                                            <el-table-column
                                                    prop="Doctor"
                                                    label="报告医生"
                                                    show-overflow-tooltip>
                                            </el-table-column>
                                        </el-table>
                                    </el-card>

                                </el-col>
                                <el-col :span="16">
                                    <el-card class="box-card">
                                        <div slot="header" class="clearfix">
                                            <span>检查结果</span>
                                            <el-button style="float: right; padding: 3px 0" @click="showYPZY('YP')" type="text">
                                                阅片
                                            </el-button>
                                        </div>
                                        <el-card class="box-card">
                                            <div slot="header" class="clearfix">
                                                <span>影像所见</span>
                                                <el-button v-if="false" style="float: right; padding: 3px 0"
                                                           type="text">操作按钮
                                                </el-button>
                                            </div>
                                            <el-input
                                                    type="textarea"
                                                    :rows="6"
                                                    placeholder=""
                                                    v-model="textareaSJ">
                                            </el-input>
                                        </el-card>
                                        <el-card class="box-card">
                                            <div slot="header" class="clearfix">
                                                <span>诊断</span>
                                                <el-button v-if="false" style="float: right; padding: 3px 0"
                                                           type="text">操作按钮
                                                </el-button>
                                            </div>
                                            <el-input
                                                    type="textarea"
                                                    :rows="6"
                                                    placeholder=""
                                                    v-model="textareaZD">
                                            </el-input>
                                        </el-card>
                                    </el-card>

                                </el-col>
                            </el-row>
                        </el-tab-pane>
                        <el-tab-pane name="zyzd">
                            <span slot="label"><i class="el-icon-document-copy"></i> 住院诊断</span>
                            <el-table
                                    ref="multipleTable"
                                    :data="ZYZDList"
                                    tooltip-effect="dark"
                                    highlight-current-row
                                    style="width: 100%"
                            >
                                <el-table-column
                                        label="诊断时间"
                                        width="120">
                                    <template slot-scope="scope">{{ scope.row.CreateDate }}</template>
                                </el-table-column>

                                <el-table-column
                                        prop="DiagCode"
                                        label="ICD编码"
                                        show-overflow-tooltip>
                                </el-table-column>
                                <el-table-column
                                        prop="DiagName"
                                        label="诊断名称"
                                        show-overflow-tooltip>
                                </el-table-column>
                                <el-table-column
                                        prop="DiagTypeName"
                                        label="类型"
                                        show-overflow-tooltip>
                                </el-table-column>

                            </el-table>
                        </el-tab-pane>
                        <el-tab-pane name="zybl">
                            <span slot="label"><i class="el-icon-date"></i> 住院病历</span>
                            <el-row>
                                <el-col :span="4" class="bltree">
                                    <el-tree :data="ZYBLMeunList"
                                             :props="defaultPropsZYBL"
                                             node-key="id"
                                             :default-checked-keys="[1]"
                                             @node-click="handleNodeClickZYBL">
                                    </el-tree>
                                </el-col>
                                <el-col :span="20">
                                    <div>
                                        <div>
                                            <el-image v-for="url in BLPicList" :key="url" :src="url" lazy></el-image>
                                        </div>
                                    </div>


                                </el-col>
                            </el-row>
                        </el-tab-pane>
                        <el-tab-pane name="zygmxx" v-if="false">
                            <span slot="label"><i class="el-icon-paperclip"></i> 过敏信息</span>
                            过敏信息
                        </el-tab-pane>
                    </el-tabs>
                </div>

            </div>
        </div>
        <div class="DiagnoseDet nBox" v-if="isShow=='MZXQ'">
            <div class="h0">
                <p class="lt">门诊详细记录</p>
                <button class="btn btn-default" style="float: right;margin-right: 6px" @click="show('JZJL')">返回就诊记录
                </button>
            </div>
            <!--右侧-->
            <div class="czq panel-default">
                <div v-if="false" class="pucType2 clearfix">

                    <p>就诊类别：<b>住院</b></p>
                    <p>诊断信息：<b style="color:red">肺部感染</b></p>
                    <p>医生姓名：<b>测试</b></p>
                    <p>科室名称：<b>测试</b></p>
                    <p>病区名称：<b>测试</b></p>
                    <p>医疗机构：<b>测试</b></p>
                </div>
                <div class="InforTable">
                    <el-tabs :tab-position="tabPosition" v-model="activeNameInforMZ" @tab-click="handleClickMZ"
                             style="height: 100%;">
                        <el-tab-pane name="mzbl" v-if="false">
                            <span slot="label"><i class="el-icon-date"></i> 门诊病历</span>
                            <el-row>
                                <el-col :span="4" class="bltree">
                                    <el-tree :data="ZYBLMeunList"
                                             :props="defaultPropsZYBL"
                                             node-key="id"
                                             :default-checked-keys="[1]"
                                             @node-click="handleNodeClickZYBL">
                                    </el-tree>
                                </el-col>
                                <el-col :span="20">
                                    <div style="height: 300px;overflow: auto!important;">
                                        <div>
                                            <el-image v-for="url in BLPicList" :key="url" :src="url" lazy></el-image>
                                        </div>
                                    </div>


                                </el-col>
                            </el-row>
                        </el-tab-pane>
                        <el-tab-pane name="mzcf">
                            <span slot="label"><i class="el-icon-s-order"></i> 处方信息</span>
                            <div class="InforTableYZ">
                                <el-tabs v-model="activeNameYZType" type="card">
                                    <el-table
                                            :data="MZCFList"
                                            height="456"
                                            style="width: 100%">
                                        <el-table-column
                                                prop="PresNo"
                                                label="处方号">
                                        </el-table-column>

                                        <el-table-column
                                                prop="ItemName"
                                                label="名称"
                                        >
                                        </el-table-column>
                                        <el-table-column
                                                prop="ItemSpec"
                                                label="规格"
                                        >
                                        </el-table-column>
                                        <el-table-column
                                                prop="UsageName"
                                                label="用法"
                                                show-overflow-tooltip>
                                        </el-table-column>
                                        <el-table-column
                                                prop="FrequencyName"
                                                label="频次"
                                                width="120"
                                                show-overflow-tooltip>
                                        </el-table-column>
                                        <el-table-column
                                                prop="Dose"
                                                label="单次用量"
                                                width="120"
                                                show-overflow-tooltip>
                                        </el-table-column>
                                        <el-table-column
                                                prop="DoseUnitName"
                                                label="用量单位"
                                                width="120"
                                                show-overflow-tooltip>
                                        </el-table-column>
                                    </el-table>
                                </el-tabs>
                            </div>
                        </el-tab-pane>
                        <el-tab-pane name="mzzl">
                            <span slot="label"><i class="el-icon-s-order"></i> 治疗信息</span>
                            <div class="InforTableYZ">
                                <el-tabs v-model="activeNameYZType" type="card">
                                    <el-table
                                            :data="MZZLList"
                                            height="456"
                                            style="width: 100%">
                                        <el-table-column
                                                prop="PresNo"
                                                label="处方号">
                                        </el-table-column>

                                        <el-table-column
                                                prop="ItemName"
                                                label="名称"
                                        >
                                        </el-table-column>
                                        <el-table-column
                                                prop="ItemSpec"
                                                label="规格"
                                        >
                                        </el-table-column>

                                        <el-table-column
                                                prop="Quantity"
                                                label="数量"
                                                width="120"
                                                show-overflow-tooltip>
                                        </el-table-column>
                                        <el-table-column
                                                prop="UnitName"
                                                label="单位"
                                                width="120"
                                                show-overflow-tooltip>
                                        </el-table-column>
                                    </el-table>
                                </el-tabs>
                            </div>
                        </el-tab-pane>
                        <el-tab-pane name="mzjy">
                            <span slot="label"><i class="el-icon-magic-stick"></i> 检验</span>
                            <el-row>
                                <el-col :span="6" class="bltree">
                                    <el-card class="box-card,JYclass">
                                        <div slot="header" class="clearfix">
                                            <span>检验报告单</span>
                                            <el-button style="float: right; padding: 3px 0" v-if="false" type="text">
                                                操作按钮
                                            </el-button>
                                        </div>
                                        <el-table
                                                ref="multipleTable"
                                                :data="MZJYList"
                                                @current-change="handleCurrentChangeMZJY"
                                                tooltip-effect="dark"
                                                height="456"
                                                highlight-current-row
                                                style="width: 100%"
                                        >
                                            <el-table-column
                                                    label="时间"
                                                    width="120">
                                                <template slot-scope="scope">{{ scope.row.CreateDate }}</template>
                                            </el-table-column>

                                            <el-table-column
                                                    prop="ReportTitle"
                                                    label="报告单名称"
                                                    show-overflow-tooltip>
                                            </el-table-column>

                                        </el-table>
                                    </el-card>

                                </el-col>
                                <el-col :span="18">
                                    <el-card class="box-card">
                                        <div slot="header" class="clearfix">
                                            <span>检验报告</span>
                                            <el-button style="float: right; padding: 3px 0" v-if="false" type="text">
                                                操作按钮
                                            </el-button>
                                        </div>
                                        <el-table
                                                ref="multipleTable"
                                                :data="MZJYBGInforList"
                                                tooltip-effect="dark"
                                                height="456"
                                                style="width: 100%"
                                        >
                                            <el-table-column
                                                    prop="ItemName"
                                                    label="检验项目"
                                                    show-overflow-tooltip>
                                            </el-table-column>
                                            <el-table-column
                                                    label="项目结果"
                                                    width="150">
                                                <template slot-scope="scope">{{ scope.row.Result }}</template>
                                            </el-table-column>
                                            <el-table-column
                                                    prop="ItemUnit"
                                                    label="单位"
                                                    width="100"
                                                    show-overflow-tooltip>
                                            </el-table-column>
                                            <el-table-column
                                                    prop="Arrow"
                                                    label="标记"
                                                    width="100"
                                                    show-overflow-tooltip>
                                            </el-table-column>
                                            <el-table-column
                                                    prop="RefRange"
                                                    label="参考范围"
                                                    width="180"
                                                    show-overflow-tooltip>
                                            </el-table-column>

                                        </el-table>
                                    </el-card>

                                </el-col>
                            </el-row>
                        </el-tab-pane>
                        <el-tab-pane name="mzjc">
                            <span slot="label"><i class="el-icon-view"></i> 检查</span>
                            <el-row>
                                <el-col :span="8" class="bltree">
                                    <el-card class="box-card,JYclass">
                                        <div slot="header" class="clearfix">
                                            <span>检查报告单</span>
                                            <el-button style="float: right; padding: 3px 0" v-if="false" type="text">
                                                操作按钮
                                            </el-button>
                                        </div>
                                        <el-table
                                                ref="multipleTable"
                                                :data="MZJCList"
                                                tooltip-effect="dark"
                                                height="456"
                                                highlight-current-row
                                                @current-change="handleCurrentChangeMZJC"
                                                style="width: 100%"
                                        >
                                            <el-table-column
                                                    label="时间"
                                                    width="120">
                                                <template slot-scope="scope">{{ scope.row.CreateDate }}</template>
                                            </el-table-column>

                                            <el-table-column
                                                    prop="ReportTitle"
                                                    label="报告名称"
                                                    show-overflow-tooltip>
                                            </el-table-column>
                                            <el-table-column
                                                    prop="CheckBody"
                                                    label="检查部位"
                                                    show-overflow-tooltip>
                                            </el-table-column>
                                            <el-table-column
                                                    prop="Doctor"
                                                    label="报告医生"
                                                    show-overflow-tooltip>
                                            </el-table-column>
                                        </el-table>
                                    </el-card>

                                </el-col>
                                <el-col :span="16">
                                    <el-card class="box-card">
                                        <div slot="header" class="clearfix">
                                            <span>检查结果</span>
                                            <el-button style="float: right; padding: 3px 0" type="text"
                                                       @click="showYP('YP')">
                                                阅片
                                            </el-button>
                                        </div>
                                        <el-card class="box-card">
                                            <div slot="header" class="clearfix">
                                                <span>影像所见</span>
                                                <el-button v-if="false" style="float: right; padding: 3px 0"
                                                           type="text">操作按钮
                                                </el-button>
                                            </div>
                                            <el-input
                                                    type="textarea"
                                                    :rows="6"
                                                    placeholder=""
                                                    v-model="textareaSJ">
                                            </el-input>
                                        </el-card>
                                        <el-card class="box-card">
                                            <div slot="header" class="clearfix">
                                                <span>诊断</span>
                                                <el-button v-if="false" style="float: right; padding: 3px 0"
                                                           type="text">操作按钮
                                                </el-button>
                                            </div>
                                            <el-input
                                                    type="textarea"
                                                    :rows="6"
                                                    placeholder=""
                                                    v-model="textareaZD">
                                            </el-input>
                                        </el-card>
                                    </el-card>

                                </el-col>
                            </el-row>
                        </el-tab-pane>
                        <el-tab-pane name="mzzd">
                            <span slot="label"><i class="el-icon-document-copy"></i> 门诊诊断</span>
                            <el-table
                                    ref="multipleTable"
                                    :data="MZZDList"
                                    height="456"
                                    tooltip-effect="dark"
                                    highlight-current-row
                                    style="width: 100%"
                            >
                                <el-table-column
                                        label="诊断时间"
                                        width="120">
                                    <template slot-scope="scope">{{ scope.row.CreateDate }}</template>
                                </el-table-column>

                                <el-table-column
                                        prop="DiagCode"
                                        label="ICD编码"
                                        show-overflow-tooltip>
                                </el-table-column>
                                <el-table-column
                                        prop="DiagName"
                                        label="诊断名称"
                                        show-overflow-tooltip>
                                </el-table-column>
                                <el-table-column
                                        prop="DiagTypeName"
                                        label="类型"
                                        show-overflow-tooltip>
                                </el-table-column>

                            </el-table>
                        </el-tab-pane>
                        <el-tab-pane name="mzgmxx" v-if="false">
                            <span slot="label"><i class="el-icon-paperclip"></i> 过敏信息</span>
                            过敏信息
                        </el-tab-pane>
                    </el-tabs>
                </div>

            </div>
        </div>
        <!--弹框：便签详细-->
        <div class="blackBg noteDetail" v-if="isYP=='YP'">
            <div class="panel-default" style="width: 100%;  height: 100%;">
                <em class="closes" @click="isYP=''">×</em>
                <div class="panel-heading">影像信息</div>
                <el-row style="height: 100%; background: white">
                    <el-col :span="6" style="height: 100%;">
                        <div class="grid-content bg-purple" style=" height:90%;overflow: auto">
                            <div v-for="item in YXPic" :key="item" style="margin-left: 12px">
                                <el-image
                                        style="width: 300px; height: 300px"
                                        :src="item"
                                        @click="setYX(item)"
                                >
                                </el-image>
                            </div>
                        </div>
                    </el-col>
                    <el-col :span="18" style="height: 100%;">
                        <div class="grid-content bg-purple-light" style="height: 100%;">
                            <el-image
                                    style="width: 100%; height: 100%;padding: 5%"
                                    :src="YXurl"
                            >
                            </el-image>
                        </div>
                    </el-col>
                </el-row>


            </div>
        </div>
    </div>
</template>
<script>
    export default {
        name: "Modularinformation",
        data() {
            return {
                msg: "SystemManagement 下的 Modularinformation",
                isYP: "",
                YXurl: '',
                YXPic: [

                ],
                tableData: [],
                activeName: "first",
                queryDataObj: {
                    BeginDate: "",
                    EndDate: "",
                    EMPI: ""
                },
                isShow: "JZJL",
                selectZYItemObj: null,
                selectMZItemObj: null,
                tabPosition: "right",
                activeNameInforZY: "zyyz",
                activeNameInforMZ: "mzcf",
                ZYBLMeunList: [],
                defaultPropsZYBL: {
                    children: 'children',
                    label: 'FileTitle'
                },
                BLPicList: [],
                activeNameYZType: "1",
                selectPatientObj: {
                    Name: "",
                    Born: "",
                    SexName: "",
                    PatientTypeName: "",
                    Empi: ""
                },
                MZLJList: [],
                MZCFList: [],
                MZZLList: [],
                MZZDList: [],
                MZJYList: [],
                MZJYBGInforList: [],
                MZJCList: [],
                MZJCBGInforList: [],
                selectJCobj: {},
                textareaSJ: "",
                textareaZD: "",
                //住院
                ZYJLList: [],
                ZYYZList: [],
                ZYZDList: [],
                ZYBLList: [],
                ZYJYList: [],
                ZYJCList: [],
                ZYZLList: [],
            };
        },
        methods: {
            setYX(url){
                this.YXurl=url
            },
            showYP(yp) {
                if(yp=="YP"){
                    if(this.selectJCobj.Kind=="PACS"){
                        this.tuxiangguancha(this.selectJCobj.StudyId)
                    }else{
                        this.getJCBGInforList(this.selectJCobj.StudyId)

                    }
                }
            },
            showYPZY(yp) {
                if(yp=="YP"){
                    if(this.selectJCobj.Kind=="PACS"){
                        this.tuxiangguancha(this.selectJCobj.StudyId)
                    }else{
                        this.getJCBGInforListZY(this.selectJCobj.StudyId)

                    }
                }
            },
            tuxiangguancha(StudyId) {
                //$scope.i = $scope.msg[0].ExamRequestId;
                console.log("图像观察");
                console.log(StudyId);
                //opendicom://PACS|14|http://114.115.149.212:13154
                // var ttt = 'opendicom://PACS|' + this.model_yxid + '|http://114.115.149.212:13154'
                // window.location.href = ttt;
                this.$scanOpenJCPACS("PACS", StudyId, this.getMsg)
            },
            //222634316
            show(name) {
                this.isShow = name
                if (this.isShow == "JZJL") {
                    this.selectZYItemObj = null
                    this.selectMZItemObj = null
                }
            },
            handleNodeClickZYBL(data) {
                console.log("住院病历树");
                console.log(data);
                this.BLPicList = []
                var urlBL = this.$getDZBLIP()+"/"+ data.FileUrl
                console.log("病历地址")
                console.log(urlBL)
                this.BLPicList.push(urlBL)
            },
            handleClickInforMZ(row) {
                console.log("当前选中门诊记录")
                console.log(row)
                this.selectMZItemObj = row;
                this.getMZCFList();
                this.show("MZXQ");
            },
            handleClickInforZY(row) {
                console.log("当前选中住院记录")
                console.log(row)
                this.selectZYItemObj = row;
                this.getZYYZList();
                this.show("ZYXQ");
            },
            handleClick(tab, event) {
                console.log(tab, event);
                this.getDataList();
            },
            handleClickMZ(tab, event) {
                console.log("门诊记录")
                console.log(tab, event);
                console.log(tab.name)
                if (tab.name == "mzbl") {

                }
                if (tab.name == "mzcf") {
                    this.getMZCFList();
                }
                if (tab.name == "mzzd") {
                    this.getMZZDList();
                }
                if (tab.name == "mzjc") {
                    this.getJCBGList();
                }
                if (tab.name == "mzjy") {
                    this.getJYBGList();
                }
                if (tab.name == "mzzl") {
                    this.getMZZLList();
                }
            },
            handleClickZY(tab, event) {
                console.log("住院记录")
                console.log(tab, event);
                console.log(tab.name)
                if (tab.name == "zybl") {
                    this.getZYBLList();
                }
                if (tab.name == "zyyz") {
                    this.getZYYZList();
                }
                if (tab.name == "zyzd") {
                    this.getZYZDList();
                }
                if (tab.name == "zyjc") {
                    this.getJCBGListZY();
                }
                if (tab.name == "zyjy") {
                    this.getJYBGListZY();
                }
                if (tab.name == "zyzl") {

                }
            },
            getDataList() {
                this.getMZJLList();
                this.getZYList();
            },
            /*****************************门诊********************************************/
            //获取门诊记录
            getMZJLList() {
                if (this.selectPatientObj == null || this.selectPatientObj.Empi == null || this.selectPatientObj.Empi == "") {
                    this.$message({showClose: true, message: "请选择患者后操作", type: "error"});
                    return
                }
                this.MZLJList = [];
                this.queryDataObj.EMPI = this.selectPatientObj.Empi
                var data = this.queryDataObj;
                console.log(data)
                this.$get("/BI2/getMZList", data)
                    .then(res => {
                        if (res.code == 0) {
                            this.MZLJList = res.data;
                        }
                        console.log("查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            //获取处方记录
            getMZCFList() {
                if (this.selectMZItemObj == null) {
                    this.$message({showClose: true, message: "请选择门诊记录后操作", type: "error"});
                    return
                }
                this.MZCFList = [];

                var data = {
                    HospitalId: this.selectMZItemObj.HospitalId,
                    VisitTime: this.selectMZItemObj.VisitTime,
                    VisitId: this.selectMZItemObj.VisitId,
                }
                console.log(data)
                this.$get("/BI2/getMZPresList", data)
                    .then(res => {
                        if (res.code == 0) {
                            this.MZCFList = res.data;
                        }
                        console.log("查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            //获取门诊治疗记录
            getMZZLList() {
                if (this.selectMZItemObj == null) {
                    this.$message({showClose: true, message: "请选择门诊记录后操作", type: "error"});
                    return
                }
                this.MZZLList = [];

                var data = {
                    HospitalId: this.selectMZItemObj.HospitalId,
                    VisitTime: this.selectMZItemObj.VisitTime,
                    VisitId: this.selectMZItemObj.VisitId,
                }
                console.log(data)
                this.$get("/BI2/getMZTreatList", data)
                    .then(res => {
                        if (res.code == 0) {
                            this.MZZLList = res.data;
                        }
                        console.log("查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            //获取门诊申请单
            getMZSQDList() {
                if (this.selectMZItemObj == null) {
                    this.$message({showClose: true, message: "请选择门诊记录后操作", type: "error"});
                    return
                }
                this.MZJYList = [];
                this.MZJCList = [];
                var data = {
                    HospitalId: this.selectMZItemObj.HospitalId,
                    VisitTime: this.selectMZItemObj.VisitTime,
                    VisitId: this.selectMZItemObj.VisitId,
                }
                console.log(data)
                this.$get("/BI2/getMZRequestList", data)
                    .then(res => {
                        if (res.code == 0) {
                            // this.MZCFList = res.data;
                            this.MZJYList = res.data.ListCheck;
                            this.MZJCList = res.data.ListTest;
                        }
                        console.log("申请单查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            //获取检验报告
            getJYBGList() {
                if (this.selectMZItemObj == null) {
                    this.$message({showClose: true, message: "请选择门诊记录后操作", type: "error"});
                    return
                }
                this.MZJYList = [];
                this.MZJYBGInforList = []
                var data = {
                    HospitalId: this.selectMZItemObj.HospitalId,
                    PatientId: this.selectMZItemObj.PatientId,
                }
                console.log(data)
                this.$get("/BI2/getLISReportList", data)
                    .then(res => {
                        if (res.code == 0) {
                            // this.MZCFList = res.data;
                            this.MZJYList = res.data;

                        }
                        console.log("申请单查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            getJYBGListZY() {
                if (this.selectZYItemObj == null) {
                    this.$message({showClose: true, message: "请选择住院记录后操作", type: "error"});
                    return
                }
                this.MZJYList = [];
                this.MZJYBGInforList = []
                var data = {
                    HospitalId: this.selectZYItemObj.HospitalId,
                    PatientId: this.selectZYItemObj.PatientId,
                }
                console.log(data)
                this.$get("/BI2/getLISReportList", data)
                    .then(res => {
                        if (res.code == 0) {
                            // this.MZCFList = res.data;
                            this.MZJYList = res.data;

                        }
                        console.log("申请单查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            //获取检验报告明细
            getJYBGInforList(StudyId) {
                if (this.selectMZItemObj == null) {
                    this.$message({showClose: true, message: "请选择门诊记录后操作", type: "error"});
                    return
                }
                this.MZJYBGInforList = []
                var data = {
                    HospitalId: this.selectMZItemObj.HospitalId,
                    StudyId: StudyId,

                }
                console.log(data)
                this.$get("/BI2/getLISReportDetail", data)
                    .then(res => {
                        if (res.code == 0) {
                            // this.MZCFList = res.data;
                            this.MZJYBGInforList = res.data;
                        }
                        console.log("申请单查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },

            //获取检查报告
            getJCBGList() {
                if (this.selectMZItemObj == null) {
                    this.$message({showClose: true, message: "请选择门诊记录后操作", type: "error"});
                    return
                }
                this.MZJCList = [];
                this.MZJCBGInforList = []
                this.textareaSJ = "";
                this.textareaZD = "";
                this.selectJCobj = {};
                var data = {
                    HospitalId: this.selectMZItemObj.HospitalId,
                    PatientId: this.selectMZItemObj.PatientId,
                }
                console.log(data)
                this.$get("/BI2/getPACSReportList", data)
                    .then(res => {
                        if (res.code == 0) {
                            // this.MZCFList = res.data;
                            this.MZJCList = res.data;

                        }
                        console.log("申请单查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            //获取检查报告
            getJCBGListZY() {
                if (this.selectZYItemObj == null) {
                    this.$message({showClose: true, message: "请选择住院记录后操作", type: "error"});
                    return
                }
                this.MZJCList = [];
                this.MZJCBGInforList = []
                this.textareaSJ = "";
                this.textareaZD = "";
                this.selectJCobj = {};
                var data = {
                    HospitalId: this.selectZYItemObj.HospitalId,
                    PatientId: this.selectZYItemObj.PatientId,
                }
                console.log(data)
                this.$get("/BI2/getPACSReportList", data)
                    .then(res => {
                        if (res.code == 0) {
                            // this.MZCFList = res.data;
                            this.MZJCList = res.data;

                        }
                        console.log("申请单查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            //获取检查报告明细
            getJCBGInforList(StudyId) {
                if (this.selectMZItemObj == null) {
                    this.$message({showClose: true, message: "请选择门诊记录后操作", type: "error"});
                    return
                }
                this.MZJCBGInforList = []
                var data = {
                    HospitalId: this.selectMZItemObj.HospitalId,
                    StudyId: StudyId,

                }
                console.log(data)
                this.$get("/BI2/getPACSReportDetail", data)
                    .then(res => {
                        if (res.code == 0) {
                            // this.MZCFList = res.data;
                            this.MZJCBGInforList = res.data;
                            this.YXurl=""
                            this.YXPic=[];
                            res.data.forEach(m=>{
                                var URL=this.$getBaseIP()+m.ImagePath+m.ImageName;
                                this.YXPic.push(URL)
                            })
                            if(this.YXPic.length==0){
                                this.$message({showClose: true, message: "该报告无影像", type: "error"});
                                return
                            }else{
                                console.log("弹出阅片")
                                this.YXurl = this.YXPic[0]
                                console.log(this.YXPic)
                                this.isYP = "YP";
                            }
                        }
                        console.log("申请单查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            //选中门诊检查
            handleCurrentChangeMZJC(val) {
                console.log("选中门诊检查")
                console.log(val)
                // this.getJCBGInforList(val.StudyId)
                this.textareaSJ = val.EyeSee;
                this.textareaZD = val.Result;
                this.selectJCobj = val;
            },
            //选中门诊检验
            handleCurrentChangeMZJY(val) {
                console.log("选中门诊检验报告")
                console.log(val)
                this.getJYBGInforList(val.StudyId)
            },
            //获取门诊诊断记录
            getMZZDList() {
                if (this.selectMZItemObj == null) {
                    this.$message({showClose: true, message: "请选择门诊记录后操作", type: "error"});
                    return
                }
                this.MZZDList = [];

                var data = {
                    HospitalId: this.selectMZItemObj.HospitalId,
                    VisitTime: this.selectMZItemObj.VisitTime,
                    VisitId: this.selectMZItemObj.VisitId,
                }
                console.log(data)
                this.$get("/BI2/getMZDiagList", data)
                    .then(res => {
                        if (res.code == 0) {
                            this.MZZDList = res.data;
                        }
                        console.log("查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            /******************************住院**********************************************/
            getZYList() {
                if (this.selectPatientObj == null || this.selectPatientObj.Empi == null || this.selectPatientObj.Empi == "") {
                    this.$message({showClose: true, message: "请选择患者后操作", type: "error"});
                    return
                }
                this.ZYJLList = [];
                this.queryDataObj.EMPI = this.selectPatientObj.Empi
                var data = this.queryDataObj;
                console.log(data)
                this.$get("/BI2/getZYList", data)
                    .then(res => {
                        if (res.code == 0) {
                            this.ZYJLList = res.data;
                        }
                        console.log("查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            //获取医嘱记录
            getZYYZList() {
                if (this.selectZYItemObj == null) {
                    this.$message({showClose: true, message: "请选择住院记录后操作", type: "error"});
                    return
                }
                this.ZYYZList = [];
                var data = {
                    HospitalId: this.selectZYItemObj.HospitalId,
                    PatientId: this.selectZYItemObj.PatientId,
                    VisitId: this.selectZYItemObj.VisitId,
                }
                console.log(data)
                this.$get("/BI2/getZYOrderList", data)
                    .then(res => {
                        if (res.code == 0) {
                            this.ZYYZList = res.data;
                        }
                        console.log("查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            //获取治疗记录
            getZYZLList() {
                if (this.selectZYItemObj == null) {
                    this.$message({showClose: true, message: "请选择住院记录后操作", type: "error"});
                    return
                }
                this.ZYZLList = [];
                var data = {
                    HospitalId: this.selectZYItemObj.HospitalId,
                    PatientId: this.selectZYItemObj.PatientId,
                    VisitId: this.selectZYItemObj.VisitId,
                }
                console.log(data)
                this.$get("/BI2/getZYOrderList", data)
                    .then(res => {
                        if (res.code == 0) {
                            this.ZYZLList = res.data;
                        }
                        console.log("查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            //获取住院申请单
            getZYSQDList() {
                if (this.selectZYItemObj == null) {
                    this.$message({showClose: true, message: "请选择住院记录后操作", type: "error"});
                    return
                }
                this.ZYJYList = [];
                this.ZYJCList = [];
                var data = {
                    HospitalId: this.selectZYItemObj.HospitalId,
                    PatientId: this.selectZYItemObj.PatientId,
                    VisitId: this.selectZYItemObj.VisitId,
                }
                console.log(data)
                this.$get("/BI2/getZYRequestList", data)
                    .then(res => {
                        if (res.code == 0) {
                            // this.MZCFList = res.data;
                            this.ZYJYList = res.data.ListCheck;
                            this.ZYJCList = res.data.ListTest;
                        }
                        console.log("查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },

            //选中门诊检查
            handleCurrentChangeZYJC(val) {
                console.log("选中门诊检查")
                console.log(val)
                // this.getJCBGInforListZY(val.StudyId)
                this.textareaSJ = val.EyeSee;
                this.textareaZD = val.Result;
                this.selectJCobj = val;
            },
            //获取检查报告明细
            getJCBGInforListZY22(StudyId) {
                if (this.selectMZItemObj == null) {
                    this.$message({showClose: true, message: "请选择门诊记录后操作", type: "error"});
                    return
                }
                this.MZJCBGInforList = []
                var data = {
                    HospitalId: this.selectMZItemObj.HospitalId,
                    StudyId: StudyId,

                }
                console.log(data)
                this.$get("/BI2/getPACSReportDetail", data)
                    .then(res => {
                        if (res.code == 0) {
                            // this.MZCFList = res.data;
                            this.MZJCBGInforList = res.data;
                            this.YXurl=""
                            this.YXPic=[];
                            res.data.forEach(m=>{
                                var URL=this.$getBaseIP()+m.ImagePath+m.ImageName;
                                this.YXPic.push(URL)
                            })
                            if(this.YXPic.length==0){
                                this.$message({showClose: true, message: "该报告无影像", type: "error"});
                                return
                            }else{
                                console.log("弹出阅片")
                                this.YXurl = this.YXPic[0]
                                console.log(this.YXPic)
                                this.isYP = "YP";
                            }
                        }
                        console.log("申请单查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            getJCBGInforListZY(StudyId) {
                if (this.selectZYItemObj == null) {
                    this.$message({showClose: true, message: "请选择住院记录后操作", type: "error"});
                    return
                }
                this.MZJCBGInforList = []
                var data = {
                    HospitalId: this.selectZYItemObj.HospitalId,
                    StudyId: StudyId,

                }
                console.log(data)
                this.$get("/BI2/getPACSReportDetail", data)
                    .then(res => {
                        if (res.code == 0) {
                            // this.MZCFList = res.data;
                            this.MZJCBGInforList = res.data;
                            this.YXurl=""
                            this.YXPic=[];
                            res.data.forEach(m=>{
                                var URL=this.$getBaseIP()+m.ImagePath+m.ImageName;
                                this.YXPic.push(URL)
                            })
                            if(this.YXPic.length==0){
                                this.$message({showClose: true, message: "该报告无影像", type: "error"});
                                return
                            }else{
                                console.log("弹出阅片")
                                this.YXurl = this.YXPic[0]
                                console.log(this.YXPic)
                                this.isYP = "YP";
                            }
                        }
                        console.log("申请单查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            //选中门诊检验
            handleCurrentChangeZYJY(val) {
                console.log("选中住院检验报告")
                console.log(val)
                this.getJYBGInforListZY(val.StudyId)
            },
            //获取检验报告明细
            getJYBGInforListZY(StudyId) {
                if (this.selectZYItemObj == null) {
                    this.$message({showClose: true, message: "请选择住院记录后操作", type: "error"});
                    return
                }
                this.MZJYBGInforList = []
                var data = {
                    HospitalId: this.selectZYItemObj.HospitalId,
                    StudyId: StudyId,

                }
                console.log(data)
                this.$get("/BI2/getLISReportDetail", data)
                    .then(res => {
                        if (res.code == 0) {
                            // this.MZCFList = res.data;
                            this.MZJYBGInforList = res.data;
                        }
                        console.log("申请单查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },



            //获取住院诊断记录
            getZYZDList() {
                if (this.selectZYItemObj == null) {
                    this.$message({showClose: true, message: "请选择住院记录后操作", type: "error"});
                    return
                }
                this.ZYZDList = [];
                var data = {
                    HospitalId: this.selectZYItemObj.HospitalId,
                    PatientId: this.selectZYItemObj.PatientId,
                    VisitId: this.selectZYItemObj.VisitId,
                }
                console.log(data)
                this.$get("/BI2/getZYDiagList", data)
                    .then(res => {
                        if (res.code == 0) {
                            this.ZYZDList = res.data;
                        }
                        console.log("查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            //获取住院病历记录
            getZYBLList() {
                if (this.selectZYItemObj == null) {
                    this.$message({showClose: true, message: "请选择住院记录后操作", type: "error"});
                    return
                }
                this.ZYBLMeunList = [];
                this.ZYBLList = [];
                var data = {
                    HospitalId: this.selectZYItemObj.HospitalId,
                    PatientId: this.selectZYItemObj.PatientId,
                    VisitId: this.selectZYItemObj.VisitId,
                }
                console.log(data)
                this.$get("/BI2/getZYDocumentList", data)
                    .then(res => {
                        if (res.code == 0) {
                            this.ZYBLList = res.data;
                            this.ZYBLMeunList = res.data;
                        }
                        console.log("查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            //
            formatDateTime(date, dt) {
                var nd = date
                nd = nd.valueOf()
                nd = nd + dt * 24 * 60 * 60 * 1000
                nd = new Date(nd)
                var y = nd.getFullYear()// 获取年
                var m = nd.getMonth() + 1// 获取月
                var d = nd.getDate()// 获取天
                var h = nd.getHours()// 获取小时
                var f = nd.getMinutes()// 获取分钟
                var s = nd.getSeconds()// 获取秒
                if (m <= 9) m = '0' + m
                if (d <= 9) d = '0' + d
                if (h <= 9) h = '0' + h
                if (f <= 9) f = '0' + f
                if (s <= 9) s = '0' + s
                // var cdate = y + '-'  + m +  '-'  + d + ' '  + h +  ':'  + f +  ':'  + s;
                var cdate = y + '-' + m + '-' + d
                return cdate

            },
            /*********************************************************************************************/
            openDetails(row, index) {
                this.model_id = row.id;
                this.model_name = row.name;
                this.changeSelectStyle = index;
                if (this.model_XZBJ == "1") {
                    this.model_jm = row.id;
                    this.queryz();
                    this.changeSelectStyle = "0";
                    this.model_jm = "";
                }

                console.log(row);
            },
            handleChange(val) {
                console.log(val);
            },
            //主表保存
            savez() {
                if (this.model_name == "") {
                    this.$message({showClose: true, message: "模块名称不能为空！", type: "error"});
                    return;
                }
                var data = {
                    model: "11.综合维护-模块信息",
                    code: "11041",
                    input: {
                        "id": this.model_id == "" ? "1" : this.model_id,
                        "name": this.model_name
                    }
                };
                this.$post("CloudHIS/Business_Handle", data)
                    .then(res => {
                        if (res.code == 0) {
                            this.model_XZBJ = "1"
                            this.$message({message: res.msg, type: "success"});
                            this.queryz();
                            this.addMasterUser();
                            document.getElementById("2").focus();
                        } else {
                            this.$message({showClose: true, message: res.msg, type: "error"});
                        }
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            //删除主表信息
            deletez() {
                var data = {
                    model: "11.综合维护-模块信息",
                    code: "11043",
                    input: {
                        "id": this.model_id
                    }
                };
                this.$post("CloudHIS/Business_Handle", data)
                    .then(res => {
                        if (res.code == 0) {
                            this.$message({message: res.msg, type: "success"});
                            this.queryz();
                            this.addMasterUser();
                        } else {
                            this.$message({showClose: true, message: res.msg, type: "error"});
                        }
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            //主表查询

            queryz() {
                this.model_query = [];
                var data = {
                    model: "11.综合维护-模块信息",
                    code: "11042",
                    input: {
                        jm: this.model_jm ? this.model_jm : ""
                    }
                };
                console.log(data)
                this.$post("CloudHIS/Business_Handle", data)
                    .then(res => {
                        if (this.model_XZBJ == "1") {
                            this.model_query.push(res.data[res.data.length - 1]);
                            this.model_XZBJ = "";
                            this.changeSelectStyle = "0";
                        } else {
                            this.model_query = res.data;
                            this.addMasterUser();
                        }
                        console.log("查询结果");
                        console.log(res);
                    })
                    .catch(err => {
                        console.log(err);
                    });
            },
            submit1() {
                var ele = window.event.srcElement;
                var idcount = parseInt(ele.id) + 1;

                document.getElementById(idcount + "").focus();
            },

        },
        mounted() {

        },
        created() {
            this.msg = this.$route.query;
            console.log("接收过来的传参#############################################################################")
            console.log(this.msg)
            if (this.msg.Token != null && this.msg.Token != "") {
                console.log("设置Token")
                this.$setToken(this.msg.Token)
                this.$setItemUrl(this.msg.ItemIP)
                var loginInfor = this.msg.loginInfor;
                this.LoginInfor = JSON.parse(loginInfor);
                console.log("个人登录信息");
                console.log(this.LoginInfor);
                if (this.LoginInfor != null) {
                    // this.huizhenObj.Consult.HospitalId = this.LoginInfor.HospitalId
                    // this.huizhenObj.Consult.DeptId = this.LoginInfor.UserId
                    // this.huizhenObj.Consult.DoctorId = this.LoginInfor.UserId
                }
            } else {
                console.log("Token为空")
                var loginInfor = localStorage.getItem('LoginInfor');
                this.LoginInfor = JSON.parse(loginInfor);
                console.log("个人登录信息");
                console.log(this.LoginInfor);
                if (this.LoginInfor == null) {
                    this.LoginInfor = {
                        SectionName: "",
                        UserName: ""
                    }
                }
            }
            this.queryDataObj.BeginDate = this.formatDateTime(new Date(), -365); //挂号日期
            this.queryDataObj.EndDate = this.formatDateTime(new Date(), 0); //挂号日期

            // this.msg.selectPatient ={}
            // this.selectHZInfor = JSON.parse(this.msg.selectPatient);
            console.log("传参%%%%%%%%%%%%患者");
            console.log(this.msg.selectPatient);
            this.selectPatientObj = this.msg.selectPatient
            if(this.msg.selectPatient!=null&&this.msg.selectPatient.Empi==null){
                this.selectPatientObj = JSON.parse(this.msg.selectPatient);
            }

            console.log(this.selectHZInfor);
            this.getDataList();
        }
    };
</script>

<style lang="scss">
    .DiagnoseRecord {
        .selectTime {
            .el-input__icon {
                height: 100%;
                width: 25px;
                display: none;
                text-align: center;
                -webkit-transition: all .3s;
                transition: all .3s;
                line-height: 40px;
            }

            .input {
                width: 90px !important;
                height: 28px !important;
            }


        }

        .el-table td, .el-table th {
            padding: 16px 0 !important;
        }

        .JYclass {
            .el-table td, .el-table th {
                padding: 20px 0 !important;
            }
        }

        .bzd {
            /*width: 328px;*/
            overflow: auto !important;
            position: fixed !important;
            bottom: 0px !important;
            top: 169px !important;
            left: 428px !important;
            right: 168px !important;
        }

        .BLPicListclass {
            overflow: auto !important;
            position: fixed !important;
            bottom: 0px !important;
            top: 169px !important;
            left: 30% !important;
            right: 30% !important;
        }

        .InforTable {
            .el-tabs__item {
                padding: 0px 21px !important;
                font-size: 19px !important;
                margin: 15px;
            }
        }

        .InforTableYZ {
            .el-tabs__item {
                padding: 0px 12px !important;
                font-size: 16px !important;
                margin: 0px !important;
            }
        }

        .bltree {
            .el-tree-node__label {
                font-style: italic;
                font-weight: 900;
            }
        }

        .visitTop {
            margin: 0;
            background: #f5f5f5;
            padding-right: 256px;
            position: relative
        }

        .visitTop .h6 {
            margin: 0;
            font-size: 14px;
            color: #0089ef;
            height: 15px;
            margin-bottom: 5px;
            line-height: 30px;
            border-bottom: 1px solid #fff;
        }

        .visitTop .h6 b {
            padding: 0 10px;
            background: #f5f5f5;
        }

        .visitTop .topGray {
            margin: 0;
            overflow: hidden;
            padding-top: 5px;
        }

        .visitTop .topGray .oneBtn {
            float: left;
            height: 60px;
            padding: 4px 40px 0 10px;
        }

        .visitTop .topGray .oneBtn .btn {
            color: red;
            background: none;
            border: 1px solid #d5d5d5;
        }

        .visitTop .topGray .zyNum {
            width: 100px;
            float: left;
            margin-right: 49px;
            padding: 0 10px;
            position: relative;
        }

        .visitTop .topGray .zyNum select {
            height: 22px;
            box-shadow: none;
            border: 1px solid #ddd;
            border-radius: 1px;
            background: none;
        }

        .visitTop .topGray .zyNum:after {
            content: '';
            width: 1px;
            height: 33px;
            position: absolute;
            right: -20px;
            top: 15px;
            background: #e2e2f5;
        }

        .visitTop .topGray .zyNum p label {
            margin-bottom: 1px;
            font-weight: normal
        }

        .visitTop .topGray .basic {
            padding: 0;
            /*max-width: 800px;*/
            height: 52px;
        }

        .visitTop .topGray .basic p {
            float: left;
            color: #666;
        }

        .visitTop .topGray .basic p:last-child {
            margin-left: -15px;
        }

        .visitTop .topGray .basic label {
            min-width: 55px;
            text-align: right;
            margin-bottom: 0;
            font-weight: normal
        }

        .visitTop .topGray .basic span {
            color: #0092ff;
            display: inline-block;
            min-width: 55px;
            margin-right: 40px;
        }

        .visitTop .topGray .basic2 {
            width: 600px;
            margin-left: 132px;
        }

        .visitTop .weather {
            width: 235px;
            position: absolute;
            right: 10px;
            top: 0;
            background: rgba(0, 0, 0, 0.5);
            height: 100%;
            padding: 10px;
        }

        .visitTop .weather p {
            color: #fff;
            line-height: 20px;
        }

        .visitTop .weather b {
            font-size: 30px;
        }

        .visitTop .weather .p0 {
            float: right
        }

        .visitTop .weather .p0 i {
            margin-right: 8px;
        }

        .visitTop .weather .p1 {
            margin: 15px 0 10px 0;
        }

        .Diagnose .pucType2 {
            padding-top: 4px;
        }

        .Diagnose .Tb {
            margin: 0 15px;
            position: absolute;
            top: 168px;
            bottom: 0;
            left: 0;
            right: 0
        }

        .Diagnose .Tb table td a {
            display: block;
        }

        .Diagnose .Tb table td b {
            font-size: 18px;
            color: #0092ff;
        }

        .Diagnose .Tb table td i {
            color: #0092ff;
            margin-right: 5px;
            cursor: pointer;
        }

        .DiagnoseDet h6 {
            background: #e8f2ff;
            font-size: 14px;
            color: #0089ef;
            height: 30px;
            line-height: 30px;
            padding: 0 0 0 10px;
            margin: 0 15px;
            border: 1px solid #c7dfff;
            border-radius: 2px;
        }

        .DiagnoseDet h6 i {
            float: right;
            font-size: 18px;
            line-height: 30px;
            padding: 0 10px;
        }

        .DiagnoseDet .pucType2 {
            padding-bottom: 8px;
            padding-top: 2px;
        }

        .DiagnoseDet .pucType2 p {
            line-height: 32px;
            margin-right: 10px;
        }

        .DiagnoseDet .Tb {
            margin: -1px 15px 10px 15px;
            min-height: 150px
        }

        /*选择平台页*/
        .IfChange {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100%;
            height: 100%;
            border: none;
            padding-left: 200px;
        }

        /*公共管理头部*/
        .nBox .h0 {
            height: 45px;
            padding: 6px 0 0 9px;
            border-bottom: 1px solid #d2ecff;
        }

        .nBox .h0 .lt {
            font-size: 18px;
            line-height: 32px;
            padding-left: 5px;
            color: #6bb1ec;
            font-weight: bold;
        }

        .nBox .h0 .rt {
            margin-right: 12px;
        }

        .nBox .h0 .rt .btn {
            margin-left: 5px;
        }

        .nBox .Ahead {
            height: 32px;
            line-height: 32px;
            padding: 0 15px;
            background: #ecf4ff;
            color: #0092ff;
        }

        .nBox .Ahead .btn {
            padding: 2px 12px;
            margin-top: -4px;
        }

        .nBox .Ahead i {
            color: #0092ff;
            cursor: pointer
        }

        .nBox .Tb label {
            margin: 0;
            display: block;
            cursor: pointer
        }

        .nBox .Tb label b {
            margin-right: 5px;
            float: left
        }

        .nBox .menu {
            padding: 0 10px 0 15px;
        }

        .nBox .menu dl {
            margin-bottom: 2px;
            position: relative;
        }

        .nBox .menu dl:before {
            content: '';
            border-left: 1px dashed #a4d5ff;
            height: calc(90%);
            position: absolute;
            left: 6px;
            top: 24px;
        }

        .nBox .menu dl:last-child:before {
            display: none;
        }

        .nBox .menu dt {
            line-height: 30px;
            font-weight: normal;
            color: #177ad0;
        }

        .nBox .menu label {
            margin: 0;
        }

        .nBox .menu label input {
            position: relative;
            top: 1px;
            margin-right: 5px;
        }

        .nBox .menu dt label {
            position: relative;
            margin-left: 2px;
        }

        .nBox .menu dt label:before {
            content: '';
            width: 7px;
            height: 0;
            border-bottom: 1px dashed #ddd;
            position: absolute;
            left: -8px;
            top: 14px;
        }

        .nBox .menu dd {
            margin-left: 28px;
            line-height: 24px;
            position: relative;
            cursor: pointer;
            padding-left: 16px;
        }

        .nBox .menu dd dd:hover,
        .nBox .menu dd.high {
            background: #ecf4ff;
        }

        .nBox .menu dd:before {
            content: '';
            border-left: 1px dashed #ddd;
            height: calc(100%);
            position: absolute;
            left: 0;
            top: 0;
        }

        .nBox .menu dd:after {
            content: '';
            width: 13px;
            height: 0;
            border-bottom: 1px dashed #ddd;
            position: absolute;
            right: calc(100% - 15px);
            top: 11px;
        }

        .nBox .menu dd:last-child:before {
            height: 11px;
        }

        .nBox .menu dd i {
            color: #999;
            margin-right: 6px;
            display: inline-block;
            width: 11px;
        }

        .nBox .menu dd label {
            display: block;
            cursor: pointer
        }

        .nBox .menu dd b {
            margin-left: -22px;
            position: relative;
            z-index: 2;
            top: -4px;
        }

        .nBox .menu dd dd {
            margin-left: 6px;
        }

        .nBox .menu b {
            width: 12px;
            display: inline-block;
            line-height: 12px;
            padding-top: 0;
            height: 13px;
            font-weight: normal;
            float: left;
            background-color: #73b1e7;
            margin-top: 8px;
            margin-right: 8px;
            font-size: 14px;
            border-radius: 2px;
            text-align: center;
            color: #ffffff;
            outline: none;
            border: 0;
            cursor: pointer;
        }

        /*背景弹框*/
        .blackBg {
            position: fixed;
            z-index: 999;
            background: rgba(0, 0, 0, 0.5);
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }

        .blackBg .closes {
            color: #666;
            font-size: 30px;
            position: absolute;
            right: 5px;
            top: 0;
            padding: 0 5px;
            cursor: pointer;
        }

        .blackBg .p500 {
            width: 550px;
        }

        .blackBg .p1000 {
            width: 1000px;
        }

        .pucType2 p {
            float: left;
            margin-left: 15px;
            margin-top: 5px;
        }

        .pucType3 p {
            float: left;
            margin-left: 10px;
            margin-top: 5px;
        }

        .pucType2 p span {
            background: #f6f6f6;
            height: 32px;
            float: left;
            border: 1px solid #ccc;
            margin-right: -2px;
            position: relative;
            padding-left: 5px;
            line-height: 31px;
            z-index: 2;
            border-top-left-radius: 3px;
            border-bottom-left-radius: 3px;
        }

        .pucType3 p span {
            background: #f6f6f6;
            height: 28px;
            float: left;
            border: 1px solid #ccc;
            margin-right: -2px;
            position: relative;
            padding-left: 5px;
            line-height: 27px;
            z-index: 2;
            border-top-left-radius: 3px;
            border-bottom-left-radius: 3px;
        }

        .pucType2 .form-control {
            width: 150px;
            padding: 0 5px;
        }

        .pucType3 .form-control {
            height: 28px;
            padding: 0 5px;
        }

        .pucType5 p {
            float: left;
            margin-left: 10px;
            margin-top: 5px;
        }

        .pucType5 p label {
            background: #f6f6f6;
            height: 28px;
            float: left;
            border: 1px solid #ccc;
            margin: 0 -2px 0 0;
            position: relative;
            padding-left: 5px;
            line-height: 27px;
            z-index: 2;
            border-top-left-radius: 3px;
            border-bottom-left-radius: 3px;
        }

        .pucType5 .form-control {
            height: 28px;
            padding: 0 5px;
            width: 132px;
        }

        .Tb {
            border: 1px solid #ccc;
        }

        .Tb table {
            border: none;
            margin: 0;
        }

        .Tb table th:first-child, .Tb table td:first-child {
            border-left: none;
        }

        .Tb table th:last-child, .Tb table td:last-child {
            border-right: none;
        }
    }

</style>
